# Contributor: Lucas Ramage <ramage.lucas@protonmail.com>
# Maintainer: Dominika Liberda <ja@sdomi.pl>
pkgname=phoronix-test-suite
pkgver=10.8.4
pkgrel=2
pkgdesc="The most comprehensive testing and benchmarking platform available for Linux"
url="https://www.phoronix-test-suite.com/"
arch="noarch"
license="GPL-3.0-or-later"
_php=php82
depends="$_php $_php-dom $_php-zip $_php-simplexml $_php-pcntl $_php-curl"
subpackages="$pkgname-doc $pkgname-bash-completion"
provides="phoromatic-server=$pkgver-r$pkgrel phoromatic-client=$pkgver-r$pkgrel"
source="$pkgname-$pkgver.tar.gz::https://github.com/phoronix-test-suite/phoronix-test-suite/archive/v$pkgver.tar.gz
	php82-1.patch::https://github.com/phoronix-test-suite/phoronix-test-suite/commit/f9f5ed8606299f73ef2adc7173cc52089cede6c8.diff
	php82-2.patch::https://github.com/phoronix-test-suite/phoronix-test-suite/commit/cd59f0a38a036b969e862cd47e1dbfa1cbb484d2.diff
	php82-3.patch::https://github.com/phoronix-test-suite/phoronix-test-suite/commit/d44c65a62ec8be2f25fb936e39d531ea28878576.diff
	appdata.patch
	php-discovery.patch
	"
options="!check" # no tests

package() {
	DESTDIR="$pkgdir" ./install-sh
	rm -rf "$pkgdir"/usr/lib/systemd

	mkdir -p "$pkgdir"/usr/share/bash-completion
	mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
}

sha512sums="
ca79369fd7752164dc5315c16c2e8dce615f4c9cf352674193ac10ad9025de5d1171dc307f2bab486da3a945bf828aa124e9896f929a0854272cee7847f3d578  phoronix-test-suite-10.8.4.tar.gz
7b761fec331ff9a2cc95dff382c4e99df6d65433de0a6057d034ff8a1940821b292fc0f462ad0d8c23f69163a195705b34dd82708d9fd789f2113397daffc98b  php82-1.patch
effb085163a837665813d99d4be689ba4182aa43cf3f7874a34e5195e5bdd70869c8a3bb7072459f309a34864ae13ac9da4829c840bb57da3fce7368107830e0  php82-2.patch
fb7294989654c34880365c48932725b533a726f37d00f720869265683384c24cee4a9c6fb4e629ee0521f04a017b13f1160da0cfb129aac423d02d567f92f050  php82-3.patch
03419864bce834bf8762117a481aa79af8ab7d5a1272c085d9b8b58bfc965b00e2f479f29962b9f1fa5f5240805203cdfb652f76e477163d4eb15f35547a3176  appdata.patch
0005e338d214f46a845a2607205f027827a3420005a2ef6ffc253fb621f22f9283ce4e4a16b6889dc72af73e868f06557acd03b2dc9a8a76b08deb42c8e8751c  php-discovery.patch
"
